if (typeof (console) == "undefined") {
	console = {};
	console.log = function() {
	}
}
window.onerror = function() {
	return true
};
( function() {
	var i = window.DomReady = {};
	var h = navigator.userAgent.toLowerCase();
	var c = {
		version :(h.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
		safari :/webkit/.test(h),
		opera :/opera/.test(h),
		msie :(/msie/.test(h)) && (!/opera/.test(h)),
		mozilla :(/mozilla/.test(h)) && (!/(compatible|webkit)/.test(h))
	};
	var d = false;
	var e = false;
	var g = [];
	function a() {
		if (!e) {
			e = true;
			if (g) {
				for ( var j = 0; j < g.length; j++) {
					g[j].call(window, [])
				}
				g = []
			}
		}
	}
	function f(j) {
		var k = window.onload;
		if (typeof window.onload != "function") {
			window.onload = j
		} else {
			window.onload = function() {
				if (k) {
					k()
				}
				j()
			}
		}
	}
	function b() {
		if (d) {
			return
		}
		d = true;
		if (document.addEventListener && !c.opera) {
			document.addEventListener("DOMContentLoaded", a, false)
		}
		if (c.msie && window == top) {
			( function() {
				if (e) {
					return
				}
				try {
					document.documentElement.doScroll("left")
				} catch (k) {
					setTimeout(arguments.callee, 0);
					return
				}
				a()
			})()
		}
		if (c.opera) {
			document.addEventListener("DOMContentLoaded", function() {
				if (e) {
					return
				}
				for ( var k = 0; k < document.styleSheets.length; k++) {
					if (document.styleSheets[k].disabled) {
						setTimeout(arguments.callee, 0);
						return
					}
				}
				a()
			}, false)
		}
		if (c.safari) {
			var j;
			( function() {
				if (e) {
					return
				}
				if (document.readyState != "loaded"
						&& document.readyState != "complete") {
					setTimeout(arguments.callee, 0);
					return
				}
				if (j === undefined) {
					var k = document.getElementsByTagName("link");
					for ( var l = 0; l < k.length; l++) {
						if (k[l].getAttribute("rel") == "stylesheet") {
							j++
						}
					}
					var m = document.getElementsByTagName("style");
					j += m.length
				}
				if (document.styleSheets.length != j) {
					setTimeout(arguments.callee, 0);
					return
				}
				a()
			})()
		}
		f(a)
	}
	i.ready = function(k, j) {
		b();
		if (e) {
			k.call(window, [])
		} else {
			g.push( function() {
				return k.call(window, [])
			})
		}
	};
	b()
})();
var Fe = Fe || {
	version :"20080809",
	emptyFn : function() {
	}
};
Fe._log = [];
var counter = 0;
var instances = {};
Fe.BaseClass = function(a) {
	instances[(this.hashCode = (a || Fe.BaseClass.guid()))] = this
};
Fe.BaseClass.guid = function() {
	return "mz_" + (counter++).toString(36)
};
Fe.BaseClass.create = function() {
	var a = new Fe.BaseClass();
	a.decontrol();
	return a
};
window.Instance = Fe.instance = Fe.I = function(a) {
	return instances[a]
};
Fe.BaseClass.prototype.dispose = function() {
	if (this.hashCode) {
		delete instances[this.hashCode]
	}
	for ( var a in this) {
		if (typeof this[a] != "function") {
			delete this[a]
		}
	}
};
Fe.BaseClass.prototype.getHashCode = function() {
	if (!this.hashCode) {
		instances[(this.hashCode = Fe.BaseClass.guid())] = this
	}
	return this.hashCode
};
Fe.BaseClass.prototype.decontrol = function() {
	delete instances[this.hashCode]
};
Fe.BaseClass.prototype.toString = function() {
	return "[object " + (this._className || "Object") + "]"
};
Fe.BaseClass.prototype._wlog = function(c, d) {
	var b = Fe._log;
	if (b.length > 100) {
		b.reverse().length = 50;
		b.reverse()
	}
	b[b.length] = "[" + c + "][" + (this._className || "Object") + " "
			+ this.hashCode + "] " + d
};
Fe.extend = function(f, d) {
	if (f && d && typeof (d) == "object") {
		for ( var e in d) {
			f[e] = d[e]
		}
		var c = [ "constructor", "hasOwnProperty", "isPrototypeOf",
				"propertyIsEnumerable", "toLocaleString", "toString", "valueOf" ];
		for ( var a = 0, b; a < c.length; a++) {
			b = c[a];
			if (Object.prototype.hasOwnProperty.call(d, b)) {
				f[b] = d[b]
			}
		}
	}
	return f
};
Fe.on = function(c, b, a) {
	if (!(c = Fe.G(c))) {
		return c
	}
	b = b.replace(/^on/, "").toLowerCase();
	if (c.attachEvent) {
		c[b + a] = function() {
			a.call(c, window.event)
		};
		c.attachEvent("on" + b, c[b + a])
	} else {
		c.addEventListener(b, a, false)
	}
	return c
};
Fe.un = function(c, b, a) {
	if (!(c = Fe.G(c))) {
		return c
	}
	b = b.replace(/^on/, "").toLowerCase();
	if (c.attachEvent) {
		c.detachEvent("on" + b, c[b + a]);
		c[b + a] = null
	} else {
		c.removeEventListener(b, a, false)
	}
	return c
};
Fe.G = function() {
	for ( var b = [], c = arguments.length - 1; c > -1; c--) {
		var d = arguments[c];
		b[c] = null;
		if (typeof d == "object" && d && d.dom) {
			b[c] = d.dom
		} else {
			if ((typeof d == "object" && d && d.tagName) || d == window
					|| d == document) {
				b[c] = d
			} else {
				if (typeof d == "string" && (d = document.getElementById(d))) {
					b[c] = d
				}
			}
		}
	}
	return b.length < 2 ? b[0] : b
};
Fe.copy = function(b) {
	var a = Fe.copy._node;
	if (!a) {
		a = Fe.copy._node = document.createElement("DIV");
		a.style.position = "absolute";
		a.style.top = "-1000px";
		a.style.left = "-1000px";
		document.body.appendChild(a)
	}
	a.innerHTML = [ "<embed ", 'src="Images/clipboard.swf" ',
			'FlashVars="clipboard=', encodeURIComponent(String(b)), '" ',
			'width="0" ', 'height="0" ',
			'type="application/x-shockwave-flash"></embed>' ].join("")
};
function beforeEndHTML(b, a) {
	b.insertAdjacentHTML("beforeEnd", a);
	return b.lastChild
}
function getClientSize() {
	if (window.innerHeight) {
		return {
			width :window.innerWidth,
			height :window.innerHeight
		}
	} else {
		if (document.documentElement && document.documentElement.clientHeight) {
			return {
				width :document.documentElement.clientWidth,
				height :document.documentElement.clientHeight
			}
		} else {
			return {
				width :document.body.clientWidth,
				height :document.body.clientHeight
			}
		}
	}
}
function foucs_(c, a, b) {
	if (!b) {
		b = ""
	}
	c.style.color = "#000";
	(c.value != a) ? null : c.value = b
}
function blur_(c, a, b) {
	c.style.color = "#8c8c8c";
	(c.value == b || c.value.length <= 0) ? c.value = a : null
}
function loadBody() {
	initMapSize();
	initMap();
	addMapControls();
	setTimeout( function() {
		mapResize()
	}, 200);
	//createCopyBt()
}
function initMapSize() {
	var c = Fe.G("MapHolder");
	var d = getClientSize().height - 200;
//	var d = getClientSize().height - 140;
	d = d < 0 ? 0 : d;
	c.style.height = d + "px";
	var a = Fe.G("MapInfo");
	var f = d + 2;
	f = f < 0 ? 0 : f;
	a.style.height = f + "px";
	var e = Fe.G("shad_v");
	var b = d;
	b = b < 0 ? 0 : b;
	e.style.height = b + "px"
}
function initMap() {
	window.map = new BMap.Map("MapHolder");
	//113.331796,23.143977
	var a = new BMap.Point(113.331796, 23.143977);
	map.addEventListener("load", function(b) {
		temp.isLoadend = true;
		getMapCenterPoint();
		getCurrentCityName();
		setTimeout( function() {
			temp.isLoadend = false
		}, 500)
	});
	map.addEventListener("moveend", function(b) {
		getMapCenterPoint();
		getCurrentCityName()
	});
	map.addEventListener("dragend", function(b) {
		getMapCenterPoint();
		getCurrentCityName()
	});
	map.addEventListener("zoomend", function(b) {
		getMapCenterPoint();
		getCurrentCityName()
	});
	map.addEventListener("click", function(c) {
		var b = c.point;
		if (c.overlay && c.overlay.toString() == "Marker") {
			b = c.overlay.point
		}
		setInputPoint(b)
	});
	map.addEventListener("mousemove", function(j) {
		if (!temp.mouseLabel) {
			createMouseMoveLabel(j.point)
		}
		if (!temp.mouseLabel.isVisible()) {
			temp.mouseLabel.show()
		}
		var d = temp.mouseLabel;
		var n = map.getContainer();
		var m = n.clientWidth;
		var l = n.clientHeight;
		var c = 132;
		var b = 19;
		var h = map.pointToPixel(j.point).x + 13;
		var f = map.pointToPixel(j.point).y + 20;
		var g = map.pixelToPoint(new BMap.Pixel(m - c - 13, l - b - 20));
		var i = map.pixelToPoint(new BMap.Pixel(h - c - 33, l - b - 20));
		var k = j.point;
		if (m - h < c) {
			k = new BMap.Point(g.lng, k.lat)
		}
		if (l - f < b) {
			k = new BMap.Point(k.lng, g.lat)
		}
		if (m - h - 16 < c && l - f < b) {
			k = i
		}
		d.setPoint(k);
		d.setContent(j.point.lng + "," + j.point.lat)
	});
	map.addEventListener("resize", function() {
		changeControlView();
		setMapCenterPoint()
	});
	Fe.on(document.body, "mousemove", function(c) {
		var c = window.event || c;
		var b = c.srcElement || c.target;
		if (!(b == Fe.G("mask")) && temp.mouseLabel
				&& temp.mouseLabel.isVisible()) {
			temp.mouseLabel.hide()
		}
	});
	Fe.on(document.body, "mouseout",
			function(c) {
				var c = window.event || c;
				var b = c.srcElement || c.target;
				if (b == Fe.G("mask") && temp.mouseLabel
						&& temp.mouseLabel.isVisible()) {
					temp.mouseLabel.hide()
				}
			});
	mapInfo.centerPoint = a;
	map.centerAndZoom(a, 12);
	getMapCenterPoint(a);
	map.enableScrollWheelZoom();
	map.setDefaultCursor("default");
	map.setDraggingCursor("default")
}
function getMapCenterPoint(a) {
	if (a) {
		temp.mapCenterPoint = a
	} else {
		if (setMapCenterPoint.timer) {
			clearTimeout(setMapCenterPoint.timer)
		}
		if (getMapCenterPoint.timer) {
			clearTimeout(getMapCenterPoint.timer)
		}
		getMapCenterPoint.timer = setTimeout( function() {
			temp.mapCenterPoint = map.getCenter();
			getMapCenterPoint.timer = null
		}, 250)
	}
}
function setMapCenterPoint() {
	if (temp.isLoadend) {
		return
	}
	if (getMapCenterPoint.timer) {
		clearTimeout(getMapCenterPoint.timer)
	}
	if (setMapCenterPoint.timer) {
		clearTimeout(setMapCenterPoint.timer)
	}
	setMapCenterPoint.timer = setTimeout( function() {
		if (temp.mapCenterPoint.toString() === "Point") {
			if (temp.mapCenterPoint === map.getCenter()) {
				return
			}
			map.panTo(temp.mapCenterPoint)
		}
		setMapCenterPoint.timer = null
	}, 350)
}
function changeControlView() {
	var a = map.getSize().height;
	if (a < 77) {
		stdMapCtrl.setType(BMAP_NAVIGATION_CONTROL_ZOOM);
		return
	}
	if (a < 127) {
		stdMapCtrl.setType(BMAP_NAVIGATION_CONTROL_PAN);
		return
	}
	if (a < 256) {
		stdMapCtrl.setType(BMAP_NAVIGATION_CONTROL_SMALL);
		return
	}
	if (stdMapCtrl.getType() === BMAP_NAVIGATION_CONTROL_LARGE) {
		return
	}
	stdMapCtrl.setType(BMAP_NAVIGATION_CONTROL_LARGE)
}
function setInputPoint(a) {
	Fe.G("pointInput").value = a.lng + "," + a.lat
}
function createMouseMoveLabel(a) {
	var c = map.pixelToPoint(new BMap.Pixel(0, 0));
	var d = a.lng + "," + a.lat;
	var b = new BMap.Label(d, {
		point :c,
		offset :new BMap.Size(13, 20),
		enableMassClear :false
	});
	b.setStyle( {
		background :"#fff",
		border :"#999 solid 1px",
		zIndex :10000000
	});
	map.addOverlay(b);
	temp.mouseLabel = b
}
function addMapControls() {
	window.stdMapCtrl = new BMap.NavigationControl();
	map.addControl(window.stdMapCtrl);
	window.scaleCtrl = new BMap.ScaleControl();
	map.addControl(window.scaleCtrl);
	window.overviewCtrl = new BMap.OverviewMapControl();
	map.addControl(window.overviewCtrl);
	var a = new BMap.CopyrightControl();
	map.addControl(a)
}
function mapResize() {
	var a = Fe.G("MapHolder");
	var b = Fe.G("shad_v");
	if (window._resizeTimer) {
		return
	}
	window._resizeTimer = setTimeout( function() {
		var d = getClientSize().height - Fe.G("mapLogo").clientHeight - 59;
		var e = d - 20;
		d = d < 0 ? 0 : d;
		e = e < 0 ? 0 : e;
		a.style.height = d + "px";
		Fe.G("MapInfo").style.height = e + "px";
		if (overviewCtrl.getDom() == null) {
			var c = parseInt(a.style.height)
		} else {
			var c = parseInt(a.style.height)
					- parseInt(overviewCtrl.getDom().style.height)
		}
		c = c < 0 ? 0 : c;
		b.style.height = c + "px";
		window._resizeTimer = null
	}, 100)
}
var mapInfo = {
	cityName :"",
	cityCode :"",
	centerPoint :null
};
var temp = {
	pt : [],
	mk : [],
	iw : [],
	iwOpenIndex :null,
	mouseLabel :null,
	poiSearchMark :null,
	geoCoder :null,
	mapCenterPoint :null,
	isLoadend :false
};
var eventTemp = {};
function clearLastResult() {
	Fe.G("resultNum").innerHTML = "";
	Fe.G("txtPanel").innerHTML = "";
	temp.pt = [];
	temp.mk = [];
	temp.iw = [];
	temp.iwOpenInde = null;
	map.clearOverlays();
	if (temp.poiSearchMark) {
		temp.poiSearchMark.hide()
	}
}
function localsearch() {
	var c = [];
	var a = Fe.G("localvalue").value;
	var b = {
		onSearchComplete : function(v) {
			clearLastResult();
			if (d.getStatus() == BMAP_STATUS_SUCCESS) {
				var l = v.getCurrentNumPois();
				var k = v.getCurrentNumPois();
				var e = v.getNumPois();
				var t = "";
				if (l == 1 && typeof v.getPoi(0).city == "undefined") {
					var f = 4;
					if (d && d._json && d._json.content
							&& d._json.content.length == 2) {
						f = d._json.content[1];
						t = '<b style="font-size:14px;">' + v.keyword + "</b>"
					} else {
						if (d
								&& d._json
								&& d._json.current_city
								&& d._json.current_city.name
								&& typeof d._json.current_city.level != "undefined") {
							f = d._json.current_city.level;
							if (d._json.current_city.name == "\u5168\u56fd") {
								f = 4
							}
							t = '<span style="color:#00c">\u5df2\u5207\u6362\u81f3'
									+ d._json.current_city.name + "</span>";
							Fe.G("resultNum").innerHTML = ""
						}
					}
					map.centerAndZoom(v.getPoi(0).point, f);
					Fe.G("txtPanel").innerHTML = t
				} else {
					var o = _res_sta_i = d._json.content.length - k;
					t = '<ul class="local_s">';
					for ( var y = 0; y < l; y++) {
						var h = v.getPoi(y);
						var p = h.title;
						var u = h.address;
						var n = h.phoneNumber;
						var q = h.point;
						var z = q.lng + "," + q.lat;
						var w = p;
						var j = h.type;
						var A = "\u5730\u5740";
						if (w.length > 20) {
							w = w.substring(0, 17) + "..."
						}
						if (j == 1) {
							A = "\u9014\u5f84\u516c\u4ea4\u8f66"
						}
						if (j == 3) {
							//途径地铁
							A = "\u9014\u5f84\u5730\u94c1"
						}
						t += '<li id="no' + y + '">';
						t += '<span id="mk_' + y + '"></span>';
						t += '	<div id="no_' + y + '">';
						t += '		<a href="javascript:void(0)" title="' + p
								+ '">' + w + "</a>";
						t += "		<p>" + A + "\uff1a" + u;
						n ? t += "		<br/>\u7535\u8bdd\uff1a" + n : null;
						t += "		<br/>\u5750\u6807\uff1a" + z;
						t += "		</p>";
						t += "	</div>";
						t += "</li>";
						c.push(q);
						temp.pt.push(q);
						addMarker(y);
						createIw( {
							tit :p,
							add :u,
							tel :n,
							poi :q,
							type :j
						})
					}
					t += "</ul>";
					t += '<div id="result_page_c"></div>';
					map.setViewport(c);
					c = [];
					Fe.G("txtPanel").innerHTML = t;
					Fe.G("resultNum").innerHTML = "\u5171\u627e\u5230" + e
							+ "\u6761\u7ed3\u679c";
					var m = new Page("result_page_c", function(i) {
						Fe.G("MapInfo").scrollTop = 0;
						d.gotoPage(i - 1)
					}, {
						page :v.getPageIndex() + 1,
						totalCount :e,
						pageCount :Math.ceil(e / 10)
					});
					if (m.pageCount <= 1) {
						Fe.G("result_page_c").innerHTML = ""
					}
					bindEvent()
				}
			} else {
				var x = "";
				Fe.G("resultNum").innerHTML = "";
				if (v.city != "\u5168\u56fd") {
					x = "\u5728<b>"
							+ v.city
							+ "</b>\u53ca\u5168\u56fd\u6ca1\u6709\u627e\u5230\u76f8\u5173\u7684\u5730\u70b9\u3002"
				} else {
					x = "\u5728\u5168\u56fd\u6ca1\u6709\u627e\u5230\u76f8\u5173\u7684\u5730\u70b9\u3002"
				}
				if (v.getCityList().length > 0) {
					if (v.city != "\u5168\u56fd") {
						x = "\u5728<b>"
								+ v.city
								+ "</b>\u6ca1\u6709\u627e\u5230\u76f8\u5173\u7684\u5730\u70b9\u3002"
					} else {
						x = "\u5728\u4ee5\u4e0b\u57ce\u5e02\u6709\u7ed3\u679c\uff0c\u8bf7\u60a8\u9009\u62e9\uff1a<br />"
					}
					var g = v.getCityList();
					if (g.length > 0) {
						x += '<p style="margin-top:10px;">\u5728\u4ee5\u4e0b\u57ce\u5e02\u627e\u5230\u7ed3\u679c\uff0c\u8bf7\u9009\u62e9\u57ce\u5e02\uff1a</p><ul class="SearchList" id="cityList" style="height:40px;overflow:hidden;">';
						for ( var y = 0; y < g.length; y++) {
							x += "<li><a onclick=\"searchInthisCity('"
									+ g[y].city
									+ '\')" href="javascript:void(0)">'
									+ g[y].city + "</a>(";
							x += g[y].numResults + ")</li>"
						}
						x += "</ul>";
						if (g.length > 6) {
							x += '<div id="moreCityPop"><a onclick="showMoreCity()" class="resultMore">\u66f4\u591a\u57ce\u5e02</a></div>'
						}
					}
				}
				Fe.G("txtPanel").innerHTML = x
			}
		}
	};
	var d = new BMap.LocalSearch(map, b);
	window.l_local = d;
	Fe.G("localsearch").onclick = function() {
		beginsearch(d)
	}
}
function setCurrentMapInfo(a, b) {
	var c = mapInfo;
	var d = map.getZoom();
	c.cityName = a;
	c.cityCode = b;
	c.centerPoint = map.getCenter();
	if (!setCurrentCity.changeCity) {
		Fe.G("curCity").innerHTML = a
	}
	setCurrentCity.changeCity = false;
	Fe.G("ZoomNum").innerHTML = d
}
function getCurrentCityName() {
	var a = map.getZoom();
	var c;
	var h = 10000;
	if (a <= 7) {
		c = a;
		//全国
		setCurrentMapInfo("\u5168\u56fd");
		return
	}
	var i = function() {
		var k = map.getBounds();
		var l = map.lnglatToMercator(k.minX, k.minY);
		var j = map.lnglatToMercator(k.maxX, k.maxY);
		var m = function(n) {
			return parseInt(n / 1000) * 1000
		};
		return m(l[0]) + "," + m(l[1]) + ";" + m(j[0]) + "," + m(j[1])
	};
	var e = mapInfo.centerPoint;
	var d = map.getCenter();
	var f = Math.sqrt((e.lng - d.lng) * (e.lng - d.lng) + (e.lat - d.lat)
			* (e.lat - d.lat));
	if (f > h || a != c) {
		c = a;
		var b = "http://map.baidu.com/?newmap=1&qt=cen&b=" + i() + "&l=" + a;
		scriptRequest(b, g, "_MAP_CENTER_", "utf8")
//		scriptRequest(b, g, "_MAP_CENTER_", "gbk")
	}
	function g() {
		if (typeof _mapCenter == "undefined") {
			return
		}
		var j = _mapCenter;
		var k = j.content;
		if (!k) {
			return
		}
		setCurrentMapInfo(_mapCenter.content.name, _mapCenter.content.uid)
	}
}
function bindEvent() {
	var f = temp.mk;
	var c = temp.iw;
	var d = function(g) {
		if (temp.iwOpenIndex == g) {
			return
		}
		temp.iwOpenIndex = g;
		f[g].openInfoWindow(c[g]);
		setInputPoint(f[g].point)
	};
	var e = function(h) {
		if (temp.iwOpenIndex == h) {
			return
		}
		var g = f[h];
		var j = g.getIcon();
		j.setImageOffset(new BMap.Size(0, -250 - h * 25));
		g.setIcon(j);
		g.setTop(true, 1000100);
		Fe.G("no_" + h).className = "hover"
	};
	var a = function(h) {
		var g = f[h];
		if (temp.iwOpenIndex == h) {
			g.setTop(true);
			return
		}
		var j = g.getIcon();
		j.setImageOffset(new BMap.Size(0, -h * 25));
		g.setIcon(j);
		g.setTop(false);
		Fe.G("no_" + h).className = ""
	};
	for ( var b = 0; b < f.length; b++) {
		( function() {
			var i = b;
			var g = f[i];
			var h = c[i];
			f[i].addEventListener("click", function() {
				d(i)
			});
			f[i].addEventListener("mouseover", function() {
				e(i)
			});
			f[i].addEventListener("mouseout", function() {
				a(i)
			});
			h.addEventListener("open", function() {
				temp.iwOpenIndex = i
			});
			h.addEventListener("close", function() {
				temp.iwOpenIndex = null;
				a(i)
			});
			Fe.on(Fe.G("no_" + i), "click", function() {
				d(i)
			});
			Fe.on(Fe.G("no_" + i), "mouseover", function() {
				e(i)
			});
			Fe.on(Fe.G("no_" + i), "mouseout", function() {
				a(i)
			});
			Fe.on(Fe.G("mk_" + i), "click", function() {
				d(i)
			});
			Fe.on(Fe.G("mk_" + i), "mouseover", function() {
				e(i)
			});
			Fe.on(Fe.G("mk_" + i), "mouseout", function() {
				a(i)
			})
		})()
	}
}
function addMarker(c) {
	var d = temp.pt[c];
	var b = new BMap.Icon("Images/markers.png", new BMap.Size(23, 25), {
		offset :new BMap.Size(10, 25),
		imageOffset :new BMap.Size(0, 0 - c * 25),
		infoWindowOffset :new BMap.Size(12, 0)
	});
	var a = new BMap.Marker(d, {
		icon :b
	});
	map.addOverlay(a);
	temp.mk.push(a);
	return a
}
function createIw(c) {
	var g = c.tit;
	var j = c.add;
	var f = c.tel;
	var a = c.poi.lng + "," + c.poi.lat;
	var b = '<p class="iwContent">';
	var h = c.type;
	var e = "\u5730\u5740";
	if (h == 1) {
		//途径公交车
		e = "\u9014\u5f84\u516c\u4ea4\u8f66"
	}
	if (h == 3) {
		e = "\u9014\u5f84\u5730\u94c1"
	}
	//:
	b += "<em>" + e + "\uff1a</em>" + j + "<br/>";
	//电话
	f ? b += "<em>\u7535\u8bdd\uff1a</em>" + f + "<br/>" : null;
	//坐标：
	b += "<em>\u5750\u6807\uff1a</em>" + a + "";
	b += "</p>";
	var i = g;
	if (i.length > 15) {
		i = i.substring(0, 12) + "..."
	}
	var d = new BMap.InfoWindow(b, {
		title :'<span class="iwTitle" title="' + g + '">' + i + "</span>",
		width :250
	});
	temp.iw.push(d);
	return d
}
function showMoreCity() {
	Fe.G("cityList").style.height = "auto";
	Fe.G("moreCityPop").style.display = "none"
}
function goCity(b) {
	var a = b.name ? "name" : b.tagName.toLowerCase() == "input" ? "value"
			: "innerHTML";
	var c = b[a];
	//c = "\u5e7f\u5dde";
	//台湾
	if (c == "\u53f0\u6e7e") {
		hidePop();
		beginsearch(l_local, "", c);
		return
	}
	getCityPoint(c)
}
function getCityPoint(b) {
	b = encodeURIComponent(b);
	var a = "http://map.baidu.com/?newmap=1&qt=cur&callback=setCurrentCity&ie=utf-8&wd="
			+ b + "&oue=1&res=jc";
	scriptRequest(a, "null")
}
function setCurrentCity(b) {
	if (b.content.error == 0) {
		setTimeout(
				function() {
					Fe.G("selCityMessage").style.display = "block";
					//请输入正确的中文城市名称
					Fe.G("selCityMessage").innerHTML = "\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u4e2d\u6587\u57ce\u5e02\u540d\u79f0"
				}, 0)
	} else {
		hidePop();
		var f = (((b.content.geo).split("|")[2]).split(";")[0]).split(",")[0];
		var c = (((b.content.geo).split("|")[2]).split(";")[0]).split(",")[1];
		var a = map.mercatorToLnglat(f, c);
		var d = b.content.level ? b.content.level : 12;
		//全国
		if (b.content.cname == "\u5168\u56fd") {
			d = 5;
			map.centerAndZoom(new BMap.Point(a[0], a[1]), d)
		} else {
			map.centerAndZoom(new BMap.Point(a[0], a[1]), d)
		}
		setCurrentCity.changeCity = true;
		clearLastResult();
		Fe.G("curCity").innerHTML = b.content.cname;
		//已切换至
		Fe.G("txtPanel").innerHTML = '<span style="color:#00c">\u5df2\u5207\u6362\u81f3'
				+ b.content.cname + "</span>"
	}
}
function hidePop() {
	if (Fe.G("selCityInput")) {
		Fe.G("selCityInput").value = "\u8bf7\u8f93\u5165\u57ce\u5e02\u540d";
		Fe.G("selCityMessage").style.display = "none";
		Fe.G("map_popup").style.display = "none"
	}
	if (eventTemp.cityPop.length > 0) {
		var a = eventTemp.cityPop;
		for ( var b = 0; b < a.length; b++) {
			Fe.un(a[b].dom, a[b].type, a[b].fun)
		}
		eventTemp.cityPop = []
	}
}
function showPop() {
	if (Fe.G("map_popup").style.display == "block") {
		return
	}
	Fe.G("map_popup").style.display = "block";
	var a = function(c) {
		var b = c.srcElement || c.target;
		while (b) {
			if (b == Fe.G("map_popup") || b == Fe.G("curCityText")) {
				return
			}
			if (b == Fe.G("selCity")) {
				Fe.G("selCityMessage").style.display = "none";
				return
			}
			if (b == document.body) {
				hidePop();
				return
			}
			b = b.parentNode
		}
	};
	Fe.on(document.body, "mousedown", a);
	eventTemp.cityPop = [];
	eventTemp.cityPop.push( {
		dom :document.body,
		type :"mousedown",
		fun :a
	})
}
var TimerSM;
function showMessage(b) {
	var a = Fe.G("searchTip");
	if (TimerSM) {
		clearTimeout(TimerSM)
	}
	a.innerHTML = b;
	TimerSM = setTimeout( function() {
		a.innerHTML = ""
	}, 1000)
}
function createCopyBt() {
	if (!document.all) {
		var a = CreateFlash("flashClipBoard", "map/resources/clipboard.swf", 42, 21,
//				var a = CreateFlash("flashClipBoard", "Images/clipboard.swf", 42, 21,
				"method=ieCopy");
		Fe.G("copyButton").innerHTML = '<span style="position:absolute;top:-15px;left:7px;">'
				+ a + "</span>"
	}
}
function CreateFlash(c, a, b, d, f) {
	var e = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'
			+ b + '" height="' + d + '" id="' + c + '" align="middle">';
	e += '<param name="allowScriptAccess" value="always">';
	e += '<param name="quality" value="high">';
	e += '<param name="movie" value="' + a + '">';
	e += '<param name="flashvars" value="' + f + '">';
	e += '<embed src="'
			+ a
			+ '" flashvars="'
			+ f
			+ '" quality="high" width="'
			+ b
			+ '" height="'
			+ d
			+ '" name="'
			+ c
			+ '" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">';
	e += "</object>";
	return e
}
//复制坐标
function ieCopy() {
	var c = Fe.G("pointInput");
	var b = c.value;
//	window.selectedPosition_ = b;
	if (!b) {
		return
	}
	if (window.clipboardData) {
		window.clipboardData.clearData();
		window.clipboardData.setData("Text", b);
		if (Fe.G("copyMessage")) {
			Fe.G("copyMessage").style.display = ""
		}
		setTimeout( function() {
			if (Fe.G("copyMessage")) {
				Fe.G("copyMessage").style.display = "none"
			}
		}, 1000)
	} else {
		try {
			Fe.copy(b);
			if (Fe.G("copyMessage")) {
				Fe.G("copyMessage").style.display = ""
			}
			setTimeout( function() {
				if (Fe.G("copyMessage")) {
					Fe.G("copyMessage").style.display = "none"
				}
			}, 1000);
			return b
		} catch (a) {
		}
	}
}
function filtQuery(a) {
	a = a || "";
	return a.replace(/[\uac00-\ud7a3]/g, "").replace(/\u2022|\u2027|\u30FB/g,
			String.fromCharCode(183)).replace(/^\s*|\s*$/g, "")
}
function beginsearch(a, d, b) {
	var c = b || Fe.G("localvalue").value;
	c = filtQuery(c);
	//请输入关键字进行搜索
	if (!c
			|| c == "\u8bf7\u8f93\u5165\u5173\u952e\u5b57\u8fdb\u884c\u641c\u7d22") {
		return
	}
	if(false){
	//	if (!b && Fe.G("pointLabel").checked) {
		searchByPoint(c)
	} else {
		if (!d) {
			// a : LocalSearch,把地图实例set进来
			a.setLocation(map)
		}
		a.search(c)
	}
}
//坐标反查
function searchByPoint(e) {
	var f = e.split(",");
	var d;
	var b = "";
	var a = temp.poiSearchMark;
	var c = temp.geoCoder;
	if (f[0] && f[0].split(".")[0].length > 5 && f[1]
			&& f[1].split(".")[0].length > 5) {
		f = map.mercatorToLnglat(f[0], f[1])
	}
	if (f[0] && f[1]) {
		clearLastResult();
		d = new BMap.Point(f[0], f[1]);
		if (!c) {
			c = new BMap.Geocoder();
			temp.geoCoder = c
		}
		c.getLocation(d, function(g) {
			if (g.address) {
				//地址：
				Fe.G("txtPanel").innerHTML = "<b>\u5730\u5740\uff1a</b>"
						+ g.address
			}
		});
		if (a) {
			a.show();
			a.setPoint(d)
		} else {
			a = new BMap.Marker(d, {
				enableMassClear :false
			});
			map.addOverlay(a);
			temp.poiSearchMark = a
		}
		map.centerAndZoom(d, 15)
	} else {
		showMessage("\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u5750\u6807")
	}
}
function searchInthisCity(a) {
	l_local.setLocation(a);
	beginsearch(l_local, "cityList")
}
document.onkeydown = function(evt) {
	var evt = window.event ? window.event : evt;
	target = evt.target ? evt.target : evt.srcElement;
	fun = target.getAttribute("callback");
	if (fun && evt.keyCode == 13) {
		eval(fun)
	}
};
function scriptRequest(url, echo, id, charset) {
	var isIe = /msie/i.test(window.navigator.userAgent);
	if (isIe && Fe.G("_script_" + id)) {
		var script = Fe.G("_script_" + id)
	} else {
		if (Fe.G("_script_" + id)) {
			Fe.G("_script_" + id).parentNode.removeChild(Fe.G("_script_" + id))
		}
		var script = document.createElement("script");
		if (charset != null) {
			script.charset = charset
		}
		if (id != null && id != "") {
			script.setAttribute("id", "_script_" + id)
		}
		script.setAttribute("type", "text/javascript");
		document.body.appendChild(script)
	}
	var t = new Date();
	if (url.indexOf("?") > -1) {
		url += "&t=" + t.getTime()
	} else {
		url += "?t=" + t.getTime()
	}
	var _complete = function() {
		if (!script.readyState || script.readyState == "loaded"
				|| script.readyState == "complete") {
			if (echo == "null") {
				return
			} else {
				if (typeof (echo) == "function") {
					try {
						echo()
					} catch (e) {
					}
				} else {
					eval(echo)
				}
			}
		}
	};
	if (isIe) {
		script.onreadystatechange = _complete
	} else {
		script.onload = _complete
	}
	script.setAttribute("src", url)
}
function Page(a, e, b) {
	Fe.BaseClass.call(this);
	if (!a) {
		return
	}
	this.container = (typeof (a) == "object") ? a : Fe.G(a);
	this.page = 1;
	this.pageCount = 100;
	this.argName = "pg";
	this.pagecap = 4;
	this.callback = e;
	this.update = true;
	var c = {
		page :1,
		totalCount :100,
		pageCount :100,
		pagecap :4,
		argName :"pg",
		update :true
	};
	if (!b) {
		b = c
	}
	for ( var d in b) {
		if (typeof (b[d]) != "undefined") {
			this[d] = b[d]
		}
	}
	this.render()
}
Fe
		.extend(
				Page.prototype,
				{
					render : function() {
						this.initialize()
					},
					initialize : function() {
						this.checkPages();
						this.container.innerHTML = this.createHtml()
					},
					checkPages : function() {
						if (isNaN(parseInt(this.page))) {
							this.page = 1
						}
						if (isNaN(parseInt(this.pageCount))) {
							this.pageCount = 1
						}
						if (this.page < 1) {
							this.page = 1
						}
						if (this.pageCount < 1) {
							this.pageCount = 1
						}
						if (this.page > this.pageCount) {
							this.page = this.pageCount
						}
						this.page = parseInt(this.page);
						this.pageCount = parseInt(this.pageCount)
					},
					getPage : function() {
						var b = location.search;
						var c = new RegExp("[?&]?" + this.argName
								+ "=([^&]*)[&$]?", "gi");
						var a = b.match(c);
						this.page = RegExp.$1
					},
					createHtml : function() {
						var g = [], c = this.page - 1, b = this.page + 1;
						g.push('<p class="page">');
						if (c < 1) {
						} else {
							if (this.page >= this.pagecap) {
								g
										.push('<span><a href="javascript:void(0)" onclick="Instance(\''
												+ this.hashCode
												+ "').toPage(1);\">\u9996\u9875</a></span>")
							}
							g
									.push('<span><a href="javascript:void(0)" onclick="Instance(\''
											+ this.hashCode
											+ "').toPage("
											+ c
											+ ');">\u4e0a\u4e00\u9875</a></span>')
						}
						if (this.page < this.pagecap) {
							if (this.page % this.pagecap == 0) {
								var f = this.page - this.pagecap - 1
							} else {
								var f = this.page - this.page % this.pagecap
										+ 1
							}
							var a = f + this.pagecap - 1
						} else {
							var h = Math.floor(this.pagecap / 2);
							var e = this.pagecap % 2 - 1;
							if (this.pageCount > this.page + h) {
								var a = this.page + h;
								var f = this.page - h - e
							} else {
								var a = this.pageCount;
								var f = this.page - h - e
							}
						}
						if (this.page > this.pageCount - this.pagecap
								&& this.page >= this.pagecap) {
							var f = this.pageCount - this.pagecap + 1;
							var a = this.pageCount
						}
						for ( var d = f; d <= a; d++) {
							if (d > 0) {
								if (d == this.page) {
									g.push("<span>" + d + "</span>")
								} else {
									if (d >= 1 && d <= this.pageCount) {
										g
												.push('<span><a href="javascript:void(0)" onclick="Instance(\''
														+ this.hashCode
														+ "').toPage("
														+ d
														+ ');">['
														+ d
														+ "]</a></span>")
									}
								}
							}
						}
						if (b > this.pageCount) {
						} else {
							g
									.push('<span><a href="javascript:void(0)" onclick="Instance(\''
											+ this.hashCode
											+ "').toPage("
											+ b
											+ ');">\u4e0b\u4e00\u9875</a></span>')
						}
						g.push("</p>");
						return g.join("")
					},
					toPage : function(b) {
						var a = b ? b : 1;
						if (typeof (this.callback) == "function") {
							this.callback(a);
							this.page = a
						}
						if (this.update) {
							this.render()
						}
					}
				});
function Popup(a) {
	Fe.BaseClass.call(this);
	this.visible = false;
	this.config = a;
	if (!this.config) {
		return
	}
	this.config.addDom = this.config.addDom ? Fe.G(this.config.addDom)
			: document.body;
	if (a.clickClose != null && a.clickClose == false) {
		this.config.clickClose = false
	} else {
		this.config.clickClose = true
	}
	this.connectDom = new Array()
}
Fe
		.extend(
				Popup.prototype,
				{
					render : function() {
						var b = this.config;
						this.main = beforeEndHTML(b.addDom,
								'<div class="map_popup" style="width:390px;display:none"></div>');
						var a = this.popBox = beforeEndHTML(this.main,
								'<div class="popup_main"></div>');
						if (b.isTitle != false) {
							//系统信息
							this.title = beforeEndHTML(a,
									'<div class="title">\u7cfb\u7edf\u4fe1\u606f</div>')
						}
						this.content = beforeEndHTML(a,
								'<div class="content"></div>');
						if (!!this.config.closeButton) {
							this.button = beforeEndHTML(a,
									this.config.closeButton)
						} else {
							this.button = beforeEndHTML(a,
									'<button id="popup_close"></button>')
						}
						this.shadow = beforeEndHTML(this.main,
								'<div class="poput_shadow"></div>');
						this.addConnectDom(this.main);
						this.initialize()
					},
					initialize : function() {
						var b = this.config;
						this.setTitle(b.title);
						this.setContent(b.content);
						this.setWidth(b.width);
						this.setHeight(b.height);
						this.show();
						var c = this;
						var a = function(g) {
							var d = g.srcElement || g.target;
							while (d) {
								var h = c.connectDom;
								for ( var f = 0; f < h.length; f++) {
									if (d == h[f]) {
										return
									}
								}
								if (d == document.body) {
									c.close();
									return
								}
								d = d.parentNode
							}
						};
						if (this.config.clickClose) {
							Fe.on(document.body, "mousedown", a)
						}
						Fe
								.on(
										this.button,
										"click",
										function(d) {
											if (c.config.clickClose) {
												Fe.un(document.body,
														"mousedown", a)
											}
											if (c.config.closeEffect
													&& typeof (c.config.closeEffect) == "function") {
												c.config.closeEffect()
											} else {
												c.main.parentNode
														.removeChild(c.main)
											}
											c.visible = false;
											if (c.config.close
													&& typeof (c.config.close) == "function") {
												c.config.close()
											}
											if (this.resizeTimer) {
												window
														.clearInterval(this.resizeTimer);
												this.resizeTimer = null
											}
											if (Fe.G("imgLogo")) {
												Fe.G("imgLogo").style.display = "";
												Fe.G("imgLogo").style.display = "inline"
											}
										});
						if (b.open && typeof (b.open) == "function") {
							b.open()
						}
					},
					setTitle : function(a) {
						if (a && this.title) {
							this.title.innerHTML = a;
							this.config.title = a
						}
					},
					setContent : function(a) {
						if (a) {
							if (typeof (a) == "string") {
								this.content.innerHTML = a
							} else {
								this.content.innerHTML = "";
								this.content.appendChild(a)
							}
							this.config.content = a
						}
					},
					setWidth : function(a) {
						if (a) {
							this.main.style.width = (a - 8) + "px";
							this.config.width = a
						}
					},
					setHeight : function(a) {
						if (this.resizeTimer) {
							window.clearInterval(this.resizeTimer);
							this.resizeTimer = null
						}
						if (a) {
							this.main.style.height = this.shadow.style.height = (a - 9)
									+ "px";
							this.config.height = a;
							if (this.config.isTitle == false) {
								this.content.style.height = (a - 2) + "px"
							} else {
								this.content.style.height = (a - 24 - 9) + "px"
							}
							this.content.style.overflowY = "auto"
						} else {
							this.content.style.height = "auto";
							this.resize()
						}
					},
					hide : function() {
						this.main.style.display = "none";
						this.visible = false
					},
					show : function() {
						this.main.style.display = "block";
						this.popBox.scrollTop = 0;
						this.visible = true
					},
					getDom : function() {
						return this.main
					},
					resize : function() {
						var a = this;
						var b = function() {
							if (a.config.isAddBottomHeight == false) {
								var c = a.content.offsetHeight
							} else {
								var c = a.content.offsetHeight + 24
							}
							if (a.mainHeight) {
								if (a.mainHeight != c) {
									a.mainHeight = c
								}
							}
							a.popBox.style.height = a.shadow.style.height = a.main.style.height = c
									+ "px";
							a.popBox.scrollTop = 0
						};
						if (this.resizeTimer) {
							window.clearInterval(this.resizeTimer);
							this.resizeTimer = null
						}
						this.resizeTimer = window.setInterval(b, 50)
					},
					close : function() {
						this.button.click()
					},
					addConnectDom : function(a) {
						this.connectDom.push(a)
					}
				});
function stopBubble(a) {
	var a = window.event || a;
	a.stopPropagation ? a.stopPropagation() : a.cancelBubble = true
}
function preventDefault(a) {
	var a = window.event || a;
	a.preventDefault ? a.preventDefault() : a.returnValue = false;
	return false
};


window.doModelessDialogAction = function(sDialogUrl, _nWidth, _nHeight, _oArgs,
		_nTop, _nLeft) {
	// 1.verify parameters
	var nWidth = _nWidth || 200;
	var nHeight = _nHeight || 200;

	var nLeft = _nLeft || (window.screen.availWidth - nWidth) / 2;
	var nTop = _nTop || (window.screen.availHeight - nHeight) / 2;

	// 2.Construct parameters for dialog
	var sFeatures = "dialogHeight: " + nHeight + "px; dialogWidth: " + nWidth
			+ "px; " + "dialogTop: " + nTop + "; dialogLeft: " + nLeft + "; "
			+ "center: Yes; scroll:Yes;help: No; resizable: Yes; status: No;";
	// 3.display Dialog
	var arArgs = new Array();
	arArgs[0] = window.location.href;
	arArgs[1] = _oArgs;
	try {
		var sResult = window.showModalDialog(sDialogUrl, arArgs, sFeatures);
		return sResult;
	} catch (e) {
		return -1;
	}

};